package com.github.shiqiyue.app.modules.sys.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.shiqiyue.app.common.enums.EnableEnum;
import com.github.shiqiyue.app.modules.sys.entity.AppKey;
import com.github.shiqiyue.app.modules.sys.mapper.AppKeyMapper;
import com.github.shiqiyue.app.modules.sys.service.IAppKeyService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * app key 服务实现类
 * </p>
 *
 * @author wenyao.wu
 * @since 2019-07-16
 */
@Service
public class AppKeyServiceImpl extends ServiceImpl<AppKeyMapper, AppKey> implements IAppKeyService {

    @Override
    public AppKey getByAppkey(String appkey) {
        QueryWrapper<AppKey> queryWrapper = new QueryWrapper<AppKey>().eq(AppKey.APP_KEY, appkey).eq(AppKey.STATUS, EnableEnum.ABLE);
        return getOne(queryWrapper);
    }


}
